

public class Wire {

	static int checkTriangle(int value){
		int check = 0;
		for(int i=1;i<=value/2;i++){
			for(int j=1;j<=i;j++){
				if((double)i+(double)j+Math.sqrt(i*i+j*j)==(double)value){
//					System.out.println(value+"="+i+"+"+j+"+"+(int)Math.sqrt(i*i+j*j));
					check++;
				}
			}
		}
		
		return check;
	}
	
	public static void main(String[] args){
		int check =0;
		for(int i=0;i<1500000;i++){
			if(checkTriangle(i)==1)check++;
		}
		System.out.println(check);
	}
}
